<%@page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="btsm.bean.BTSPage,java.sql.*"%>
<%!ResultSet rs;%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%
        BTSPage mypage = new BTSPage("magnifier", "");
%>
<%
            String jspName = request.getRequestURI();
            jspName = jspName.substring(jspName.lastIndexOf("/") + 1);
	        String strToPage = request.getParameter("ToPage");
		    String strbtsname = request.getParameter("btsname");
			String strbtscode = (String) request.getAttribute("btscode");
			String strsnid = (String) request.getAttribute("snid");
			if(strsnid == null || strsnid.equals("null"))
				strsnid = "";			
%>
<%String titlename="塔放数据";%>
<script language="javascript" src="jscheck.js"></script>
<script type="text/javascript" src="./datePicker/WdatePicker.js"></script>
<HTML>
<HEAD>
    <TITLE><%=titlename%>管理</TITLE>
    <META http-equiv=Content-Type content="text/html; charset=UTF-8">
    <LINK href="Admin_Style.css" type=text/css rel=stylesheet>
</HEAD>
<BODY style="margin:2px; overflow:auto">
<script>
    <!--
    function tst(obj0,obj1,obj2){
        obj0.style.border="1 "+obj1+" solid";
        obj0.style.background=obj2;
    }
    //-->
	function btnReturn(){
	     document.frmReturn.submit();
	}
</script>
<script>
	function btnRinsertS(){
		document.Jz_myform.seraction.value="serinsertsimple";
		document.Jz_myform.submit();
	}
	function btnModifyU(){
		document.Jz_myform.seraction.value="sermod";
		document.Jz_myform.submit();
	}
</script>
<SCRIPT LANGUAGE="JavaScript">
    <!--
    function textCounter(field, maxlimit) {
        if (field.value.length > maxlimit)
            field.value = field.value.substring(0, maxlimit);
    }
    //-->
</SCRIPT>
<SCRIPT>
    function tjsj(x){
        document.Jz_myform.snid.value=x;
		document.Jz_myform.seraction.value="serdel";
        if(confirm('确认要删除流水号为'+x+'的记录吗？'))
        	document.Jz_myform.submit();     
    }

    function tjsjx(x){
        document.Jz_myform.snid.value=x;
		document.Jz_myform.seraction.value="sermodp";
        document.Jz_myform.submit();
    }
</SCRIPT>

<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
    <TBODY>

<!--*********搜索工具条开始*****************-->		

<!--*********搜索工具条结束*****************-->	


<!--*************列表显示开始****************-->
		<TR>
            <TD>
<TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
<TR>
<TD>
    <TABLE class=border cellSpacing=1 cellPadding=2 width="100%" align=center border=0>
        <FORM name="hj_myform" action="ser_cableRPole" method="post">

            <TBODY id=Tabs>
            <!--光缆管理列表表头开始-->
            <TR class=title align=middle height=2l2>
                <TD>流水号</TD>
				<TD>基站编号</TD>
                <TD>基站名称</TD>
                <TD>型号</TD>
                <TD>容量</TD>
                <TD>厂家</TD>
                <TD>数量</TD>
                <TD>使用小区</TD>
                <TD>启用日期</TD>				
                <TD colspan="2"><p align="center">操作</p></TD>
            </TR>

            <!--光缆管理列表列表表头结束-->
  <!--基站地理环境管理记录开始-->
<%
		String strValues[] = new String[12];
		String idtmp;

        if (session.getAttribute("parax") == null) {
            rs = mypage.myBTSFQuery(request, response, 1, 10, strbtscode);
        } else {
            rs = mypage.myBTSFQuery(request, response, 1, 10, strbtscode);
        }

        while (rs.next()) {
				
            %>
			

            <TR class=tdbg onMouseOver="this.className='tdbgmouseover'" onMouseOut="this.className='tdbg'" align=middle>
                <TD><%=rs.getString(1)%></TD>
                <TD><%=rs.getString(2)%></TD>
                <TD><%=rs.getString(3)%></TD>
                <TD><%=rs.getString(4)%></TD>
                <TD><%=rs.getString(5)%></TD>
                <TD><%=rs.getString(6)%></TD>
                <TD><%=rs.getString(7)%></TD>
                <TD><%=rs.getString(8)%></TD>
                <TD><%=rs.getDate(9)%></TD>				
                <TD align="center"><a href="javascript:tjsjx('<%=rs.getString(1)%>')">修改</a></TD>
                <TD align="center"><a href="javascript:tjsj('<%=rs.getString(1)%>')">删除</a></TD>
            </TR>

            <!--基站地理环境管理记录结束-->
 		<%
	 		idtmp = rs.getString(1);
			if(strsnid.equals(""))
	        {
    	        strsnid = rs.getString(1);
        	}
			if(strsnid.equalsIgnoreCase(idtmp))
			{
				for(int i = 0; i < 12; ++i)
				{
						strValues[i] = rs.getString(i+1);
				}
			}		

        }
        String footer = mypage.PageFooter("ser_bts?seraction=sermodp&btscode="+strbtscode+"&filesnames="+jspName+"&");
            %>

        <% 
			rs.close();
        	mypage.dbConClose();
		%>
            <p align="left">
        </FORM>

        </p>

    </TD>
    </TR>
    <TR class=tdbg onMouseOver="this.className='tdbgmouseover'" onMouseOut="this.className='tdbg'" align=middle>
        <TD colspan="13">
            <p align="center">
            <div class="article-bottom">
                <div class="pages">
                    <%out.println(footer);%>
                </div>
            </div><!--article-bottom -->

          <!--content -->
            <!--mainWrapper -->
            <div id="footer">
                <div id="innerFooter"></div>
            </div>

        </TD>
    </TR>

    </TBODY>

</TABLE>
</TD></TR></TABLE>
			</TD>
		</TR>
<!--************列表显示结束****************-->			

        <TR>
            <TD>
                <TABLE class=border cellSpacing=1 cellPadding=2 width="100%" align=center border=0>
                    <FORM name="Jz_myform" action="ser_magn" method="post"> <!--更改-->
                        <!--添加数据表单开始-->
                        <TBODY id=Tabs>
                            <TR class=tdbg>
                                <TD class=tdbg5 height="26">流水号：</TD>
                                <TD height="26">
                                    <%=strValues[0]%>
                                    <input type="hidden" name="T1" size="46" class=text2d value="<%=strValues[0]%>" maxlength="20" onBlur="chk(this.value,this)">
                                </TD>
                                <TD class=tdbg5 height="26">基站编号：</TD>
                                <TD height="26">
                                    <%=strValues[1]%>
                                    <input type="hidden" name="T1" size="46" class=text2d value="<%=strValues[1]%>" maxlength="12" onBlur="checkQuote(this.value,this)">
                                </TD>
                            </TR>
                            <TR class=tdbg>
                                <TD class=tdbg5 height="26">基站名称：</TD>
                                <TD height="26">
                                    <%=strValues[2]%>
                                    <input type="hidden" name="T1" size="46" class=text2d value="<%=strValues[2]%>" maxlength="20" onBlur="checkQuote(this.value,this)">
                              </TD>
                                <TD class=tdbg5 height="26">规格型号：</TD>
                                <TD height="26">
                                    <input type="text" name="T1" size="46" class=text2d value="<%=strValues[3]%>" maxlength="24" onBlur="checkQuote(this.value,this)"></TD>
                            </TR>
                            <tr class=tdbg>
                                <!--TD class=tdbg5 height="26">容量：</TD>
                                <TD height="26"-->
                                    <input type="text" style="visibility:hidden" name="T1" size="49" class=text2d value="<%=strValues[4]%>" maxlength="24" onBlur="checkQuote(this.value,this)">
                                <!--/TD-->
                                <TD class=tdbg5 height="26">厂家：</TD>
                                <TD height="26">
                                    <input type="text" name="T1" size="46" class=text2d value="<%=strValues[5]%>" maxlength="32" onBlur="checkQuote(this.value,this)">
                                </TD>
                            </tr>
                       
							  <tr class=tdbg>
                                <TD class=tdbg5 height="26">数量：</TD>
                                <TD height="26">
                                    <input type="text" name="T1" size="49" class=text2d value="<%=strValues[6]%>" maxlength="11" onBlur="isDigit(this.value,this)">
                                </TD>
                                <TD class=tdbg5 height="26">使用小区：</TD>
                                <TD height="26">
                                    <input type="text" name="T1" size="46" class=text2d value="<%=strValues[7]%>" maxlength="24" onBlur="checkQuote(this.value,this)">
                                </TD>
                            </tr>
                            <tr class=tdbg>
                                <TD class=tdbg5 height="18">启用日期：</TD>
                              <TD height="18"><input type="text" name="T1" size="12" class="Wdate" value="<%=strValues[8]%>" id="d122" onFocus="WdatePicker({isShowWeek:true,onpicked:function() {$dp.$('d122_1').value=$dp.cal.getP('W','W');$dp.$('d122_2').value=$dp.cal.getP('W','WW');}})"/></TD>
                                <TD class=tdbg5 height="18">更换及维修记录：</TD>
                                <TD colspan="2" height="18">
                                    <input type="text" name="T1" size="46" class=text2d value="<%=strValues[9]%>" maxlength="24" ><input type="hidden" name="T1" value="">
                                </TD>                            
                            </tr>
                            <TR class=tdbg>
                                <TD class=tdbg5 height="19">备注：</TD>
                                <TD colspan="4" height="19">
                                    <textarea rows="7" name="T1" id="T2" cols="60" class=text2d onPropertyChange="textCounter(T2,64)" onBlur="checks(this.value,this)"><%=strValues[11]%></textarea>
                                </TD>
                            </TR>
                            <TR class=tdbg>
                                <TD class=tdbg5 height="51" colspan="5">
                                    <p align="center">
									
                      <input type="hidden" name="filesnames" value=<%=jspName%>>
 			  		  <input type="hidden" name="seraction" value="sermod">
		              <input type="hidden" name="btscode" id="btscode" value="<%=strbtscode%>">
  					  <input type="hidden" name="btsname" id="btsname" value="<%=strbtsname%>">	
					  <input type="hidden" name="snid" id="snid" value="<%=strsnid%>">
					  <input type="hidden" name="tToPage"  id="tToPage" value="<%=strToPage%>">
									
					  <input type="button" value="增加" name="btnInsert" style="width: 72; height: 25" class=tx_button onMouseOver="tst(this,'blue','#ffffff')" onMouseOut="tst(this,'black','#e8e7fe')" onClick="btnRinsertS();">
					  &nbsp;&nbsp;&nbsp;&nbsp;

                                    <input type="button" value="修改保存" name="JzB1" style="width: 72; height: 25" class=tx_button onMouseOver="tst(this,'blue','#ffffff')" onMouseOut="tst(this,'black','#e8e7fe')" onClick="btnModifyU();">
                                    &nbsp;&nbsp;&nbsp;&nbsp;
                                    <input type="reset" value="重置" name="JzB2" style="width: 72; height: 25" class=tx_button onMouseOver="tst(this,'blue','#ffffff')" onMouseOut="tst(this,'black','#e8e7fe')">
                                    &nbsp;&nbsp;&nbsp;&nbsp;
                                    <input type="button" value="返回" name="JzB4" style="width: 72; height: 25" class=tx_button onMouseOver="tst(this,'blue','#ffffff')" onMouseOut="tst(this,'black','#e8e7fe')" onClick="btnReturn();">
                                </TD>
                            </TR>
                        </TBODY>
                    </FORM>
              </TABLE>
	<FORM name="frmReturn" action="/btsm/nnlist_graph.jsp" method="post" target="_parent">
	</FORM>	
</TD></TR></TBODY></TABLE>
</BODY></HTML>